import request from '../utils/request'
// 获取文章分类列表
export const getArtlistApi = () => {
  return request({
    url: '/my/cate/list',
    method: 'get'
  })
}

// 新增文章分类
export const addArtlistApi = (data) => {
  return request({
    url: '/my/cate/add',
    method: 'post',
    data
  })
}

// 编辑文章分类函数
export const editartApi = (editartApi) => {
  return request({
    url: '/my/cate/info',
    method: 'get',
    params: { id: editartApi }
  })
}

// 更新文章分类
export const updatecateApi = (data) => {
  return request({
    url: '/my/cate/info',
    method: 'put',
    data
  })
}

// 根据id删除文章分类函数
export const delcateApi = (id) => {
  return request({
    url: '/my/cate/del',
    method: 'DELETE',
    params: { id }
  })
}
